let arr1 = [1, 2, 3, 4, 5, 6]
//方法一：splice操作数组会改变原来的数组
arr1.splice(2, 1) //[ 1, 2, 4, 5, 6 ]
let arr2 = [1, 2, 3, 4, 5, 6]
//方法二：slice截取数组，不改变元素组
let delArr = arr2.slice(0, 2).concat(arr2.slice(3)) //[ 1, 2, 4, 5, 6 ]
//方法三：delete数组中的元素 再把这个元素剔除掉
delete arr2[2]
let delArr1 = arr2
  .join(" ")
  .replaceAll(/\s{1,2}/g, " ")
  .split(" ") //[ '1', '2', '4', '5', '6' ]
